package com.hamizhong.iflowers.web.base;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.hamizhong.iflowers.common.logger.MyLogger;
import com.hamizhong.iflowers.common.logger.MyLoggerFactory;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public abstract class MyBaseInterceptor extends AbstractInterceptor {
	
	protected MyLogger logger = MyLoggerFactory.getLogger(this.getClass());
	
	protected HttpServletRequest getRQ(){
		return ServletActionContext.getRequest();
	}
	
	protected HttpServletResponse getRP(){
		return ServletActionContext.getResponse();
	}
	
	protected HttpSession getSSN(){
		return ServletActionContext.getRequest().getSession();
	}
	
	protected PrintWriter getPW() throws IOException {
		return ServletActionContext.getResponse().getWriter();
	}
	
}
